package cn.minis.beans.factory.config;


import lombok.Data;

@Data
public class BeanDefinition {
    
    String SCOPE_SINGLETON = "singleton";
    String SCOPE_PROTOTYPE = "prototype";
    private boolean lazyInit = false;
    private String[] dependsOn;
    
    
    private ConstructorArgumentValues constructorArgumentValues;
    private PropertyValues propertyValues;
    private String initMethodName;
    private volatile Object beanClass;
    
    private String scope = SCOPE_SINGLETON;
    
    
    private String id;
    private String className;
    
    public BeanDefinition(String id, String className) {
        this.id = id;
        this.className = className;
    }
    
    public Boolean isSingleton() {
        return scope.equals(SCOPE_SINGLETON);
    }   
    
    public Boolean isPrototype() {
        return scope.equals(SCOPE_PROTOTYPE);
    }
    
    //省略getter和setter
}